<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增兽药出库记录')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncDrugsLogs-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">兽药id：</label>
				<div class="col-sm-8">
					<input id="drugId" name="drugId" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">出库数量：</label>
				<div class="col-sm-8">
					<input id="outputAmount" name="outputAmount" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">单位：</label>
				<div class="col-sm-8">
					<input id="unit" name="unit" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">出库时间：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" class="form-control" type="text">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">经手人：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">领用人：</label>
				<div class="col-sm-8">
					<input id="receiver" name="receiver" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea rows="4" name="remark"  class="form-control" type="text"></textarea>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/ncDrugsLogs"
		$("#form-ncDrugsLogs-add").validate({
            rules: {
                outputAmount: {
                    required: true,
                    digits: true
                }

            },
            messages: {
                outputAmount: "出库数必须为正整数"
            },
            focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-ncDrugsLogs-add').serialize());
	        }
	    }
	</script>
</body>
</html>
